<?php
$dbcnx = mysqli_connect("216.185.102.20", "darylho", "8604923?", "mobile_loan_application");
/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

if ($result2 = $dbcnx -> query("SELECT customer.customer_title, customer.customer_given_name, customer.customer_surname, loan.loan_id
                                 , loan.loan_application_date, loan.loan_status FROM `customer` INNER JOIN `loan` ON customer.customer_id = loan.customer_id")) {
    while ($obj2 = mysqli_fetch_array($result2)) {
        extract($obj2);
        print("$customer_title:");
        print("$customer_given_name:");
        print("$customer_surname:");
        print("$loan_id:");
        print("$loan_application_date:");
        print("$loan_status:");
        
    }

}



mysqli_close($dbcnx);
